package com.xuanrui.pubInter;

import lombok.Data;

import java.util.List;

/**
 * @author sunke
 * @version 1.0
 * @Description 联表查询
 * @date 2022-10-10 23:38
 */
@Data
public class TableJoin {

    /**
     * 关联表
     */
    private String from;

    /**
     * 主表里对应关联表的字段
     */
    private String localField;

    /**
     * 关联表对应的关联字段
     */
    private String foreignField;


    /**
     * 表别名
     */
    private String as;


    private List<TableJoinShowField> showFieldList;


    public TableJoin(String from, String localField, String foreignField) {
        this.from = from;
        this.localField = localField;
        this.foreignField = foreignField;
        this.as = from;
    }

    public TableJoin(String from, String localField, String foreignField, String as) {
        this.from = from;
        this.localField = localField;
        this.foreignField = foreignField;
        this.as = as;
    }


}

